

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>

</title><link href='./home/css/etm.css' rel='stylesheet' type='text/css' /><!--[if IE 8]> <link href='/Themes/Theme3/ie8Fix.css' rel='stylesheet' /> <![endif]-->

    <script src="./home/js/jquery-1.4.2.min.js"></script>
    <script src="./home/js/flexigrid.js"></script>
    <script src="./home/js/jQuery.Ex.js"></script>
    <meta http-equiv="X-UA-Compatible" content="IE=11; IE=10; IE=9; IE=8; IE=7; IE=EDGE"/><script src='./home/js/jquery.nicescroll.min.js' type='text/javascript'></script><script type='text/javascript'>var isEtmClient=false;function ReSizeScrollbar() { if ($('form').getNiceScroll().length > 0) {     $('form').getNiceScroll().onResize();}}function ReSizeFlexgridScrollbar() { if ($('.bDiv').getNiceScroll().length > 0) {     $('.bDiv').getNiceScroll().onResize();}}function InitFlexgridScrollbar(){     $('.bDiv').niceScroll({cursorcolor: '#75A801',zindex:4});}function ReSizenDivScrollbar() { if ($('.flexigrid .nDiv').getNiceScroll().length > 0) {     $('.flexigrid .nDiv').getNiceScroll().onResize();}}function InitnDivScrollbar(){     $('.flexigrid .nDiv').niceScroll({cursorcolor: '#75A801',horizrailenabled:false});}function proxyExecuteFun(funName) {if(funName == undefined || funName==null|| funName.length==0){window.parent.showsending(true, "执行中，请耐心等待");setTimeout(function() { window.parent.showsending(false); }, 5000);return;}  if (window[funName]()) {window.parent.showsending(true, "执行中，请耐心等待");setTimeout(function() { window.parent.showsending(false); }, 5000);return true; } return false; };var _tmpOnSelectedFile = null;function onSelectedFile(fileName, fileUrl, isImg) {   if (_tmpOnSelectedFile != null) {        _tmpOnSelectedFile(fileName, fileUrl, isImg);    }}function showFileList(callback) {   window.parent.showDialog('查看素材库', '/Modules/OA/CMyFileListView.aspx?navId=40794e66-8ad0-400a-964a-aba1f009c80e', '900px', '450px');   _tmpOnSelectedFile = callback;}$(function () {if (navigator.userAgent.toLowerCase().indexOf('edge/') != -1) { $('input[type=submit],.tmpSubmitButton').bind({ mouseenter: function () { $(this).addClass('tmpSubmitButton'); $(this).prop('type', 'button'); }, mouseleave: function () { $(this).removeClass('tmpSubmitButton'); $(this).prop('type', 'submit'); }, click: function () { $(this).removeClass('tmpSubmitButton'); $(this).prop('type', 'submit'); } }); }if (window.parent != undefined && window.parent != null && typeof window.parent.showsending != "undefined") { window.parent.showsending(false, ''); }$(".button").each(function() { if ($(this).attr("type") == "submit" &&!$(this).hasClass('noloading') && window.parent != undefined && window.parent != null && typeof window.parent.showsending != "undefined") { var tmpClick = $(this).attr("onclick");if(tmpClick == undefined || tmpClick==null|| tmpClick.length<2){ $(this).attr("onclick","proxyExecuteFun();");return;}  if (tmpClick.indexOf("return ") != -1 && tmpClick.indexOf("(") != -1) { tmpClick = tmpClick.substring(7).replace(/\s+/g, ''); if (tmpClick.indexOf("()") != -1) { var funName = tmpClick.substring(0, tmpClick.indexOf("(")); $(this).attr("onclick","return proxyExecuteFun('" + funName + "');"); } } } });$('body').click(function() {     if (typeof parent.onChildPageClick !='undefined') {         parent.onChildPageClick();     }});     $('form').height($(window).height()-0).niceScroll({cursorcolor: '#75A801',horizrailenabled:false });     $(window).resize(function () {         ReSizeScrollbar();     });});</script>
    <script type="text/javascript">
        function ShowInfo(memberGuid, navId) {
            window.parent.showDialog("幼儿资料查看", "../Modules/CRM/MemberInfo.aspx?memberGuid=" + memberGuid + "&navId=" + navId, "976px", "450px");
        }
        var fixPageHeight = 95;
    </script>
</head>
<body>
    <form method="post" action="CarMembers.aspx?navId=40794e66-8ad0-400a-964a-aba1f009c80e" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTQxMDQ5MzA0Mg9kFgICAw9kFgJmD2QWAgIBDxBkEBUUCeivt+mAieaLqQzlubzlhL/lp5PlkI0M5bm85YS/5pi156ewBuWtpuWPtwbnlJ/ml6UM5bm85YS/57G75Z6LDOaJi+acuuWPt+eggQzlubzlhL/mnaXmupAM5b2V5YWl5pel5pyfDOWFpeWtpuaXpeacnwblrabmnJ8M5a626ZW/5aeT5ZCNBuePree6pwzlr7zlhaXmibnmrKEG5qCH562+DOWbuuWumueUteivnQblpIfms6gM5a625bqt5L2P5Z2ADOemu+agoeaXpeacnwzlu7rorq7nuqfliKsVFCZ8fDAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMDZzdHJpbmd8TWVtYmVyTmFtZXxmMDMyNmNiNy00MmI1LTRmNWYtOWJmNC1iOTIyNDA0MGZlOGE0c3RyaW5nfE5pY2tOYW1lfDdiMDQ0YTI5LTFkNmYtNDgzOC1iMjk3LTYzZTU2YzgwODViMzJzdHJpbmd8Q2FyZE5vfGY4MjgyZTM4LTI3YzgtNDk3Zi05NjQ1LTcyNjFmYTk1Yjg2YTdkYXRldGltZXxCaXJ0aERhdGV8NjRjNGM5ZGItZGNkOS00NjM2LWJkMTMtMmQzYzdjYzhjNjBmOnN0cmluZ3xNZW1iZXJUeXBlTmFtZXwzNWY0MDdlMS0xODg1LTQ1ZWQtOGI5Ni0xZDJlODBiYTkzNTYyc3RyaW5nfE1vYmlsZXw3N2JmOWZmYS03Mzg4LTQxNTMtOGIyMy0xZjYxODFjM2Q1ZDc2c3RyaW5nfFNvdXJjZU5hbWV8OGY0MDNlZWEtZTM3Yy00YjFhLTliMzMtN2JlYmEzOTgwMmFkOGRhdGV0aW1lfENyZWF0ZVRpbWV8ZDBiMDJlZmQtMGU4OC00YzgwLWE1ZTEtYmRlNTBmYzNhNzMwOGRhdGV0aW1lfEVucm9sbERhdGV8NjhkZmFhYzMtZmVjZC00ZDYyLWIzYWMtMzFlMTEyNTM4M2QxNHN0cmluZ3xUZXJtTmFtZXw0OGNmOWZkMC1lNDM1LTRhNDgtYTAyOC0xOTIyM2YyY2I4YWE0c3RyaW5nfEd1YXJkaWFufGIyY2NmNzFlLTA4NmQtNDRkYS1iMzI2LWZmOTAwZjMwNjEyMTVzdHJpbmd8Q2xhc3NOYW1lfDg0MGFhYmY1LTlhZGYtNDBiMy05YWEyLTRkNDRhNDU4YzE3NjZzdHJpbmd8QmF0Y2hUaXRsZXwxOWFmYTY2MS1jMTMzLTQxNmYtYTlhYy1hNWM5YjM0OWMzNGQxc3RyaW5nfE1hcmtzfDBlYTE5MjU1LWY0M2ItNDZjYi05NDBiLWFlNzYyMjU5M2E1YjFzdHJpbmd8UGhvbmV8YzRlMzMyMDItOTliMS0xMDMxLWEyODEtY2UyNzU5NGE2NTFlMXN0cmluZ3xOb3Rlc3xlN2IwZGQ5ZS05OWIwLTEwMzEtYTI4MS1jZTI3NTk0YTY1MWUzc3RyaW5nfEFkZHJlc3N8NzhlODZkMzktOGJhMi00MWIwLWIyYzUtOGMyOTA4NDA2OTI3OmRhdGV0aW1lfEdyYWR1YXRlRGF0ZXxmOGNlZTNiZi1lODU1LTRjNzEtOTc4YS04YTA1ZGM4YTRjOTc2c3RyaW5nfE1lbWJlcl9VRDF8N2FiZjQ4YzMtYWE3NC00YTljLWJmODktZTNhNzg5MTUyMWNiFCsDFGdnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZGRkStWVkc4MOLUcI6mpRCS0+TV1eU/j5w+S38c2Of45UnM=" />
</div>

<div class="aspNetHidden">

	<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="0D60EBC2" />
	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdABWxEtDy5iUeRISSP9ggp+oJ3BiCyKY6sBYEM4cflALgqSVtGIvY/PwxIbRUQJVeWfKJdAI75+kGe0l9fdPAn/XSI/V6yRo2aaZdMvBsbBv38YcVmNob0/ND8LArMRLHD770ztLodR43YKCx8hyo5xj8CKrQYD1mTL8G6+76GeAPnJftKXlpXt6HE/+ASyjacLVMZx1upmgkARjlKebVAjRp84IbTJ7kinGH6w3/uapI2or9vlOs1zjEBM3pXK4r2Ai+lPlQluxGF13Blxrt8Q0H3cUBM0maIRnNg253V/PnkOvQTHBELcKMc0K6iSYt7TpauoNxgYf9Q76+RoCpp+aqk6aozE6FcTDGXs8AYIMcIaoRLBNgDOOfPrfyvqLaa7GEzqXIKEs/CPfh1aqljVu4w6Sm3YSyH1CNk6vXZZ2sxPycXvts/qKfnvEMMlGj4tZSWwEVgzIx6t0sOo388mQd6rbePdI0nz23xlxE5+VlOA==" />
</div>
        
<script src="../../Scripts/jquery.cookie.js"></script>
<script src="../../Scripts/json2.min.js"></script>
<input type="text" class="hidden" id="tbAdvSearchParams" name="tbAdvSearchParams"/>
<input type="text" class="hidden" id="tbAdvSearchMultiParams" name="tbAdvSearchMultiParams"/>
<style type="text/css">
    .floatSearch{ margin-top: 8px;margin-bottom: 8px;}
</style>
<div class="floatSearch" >
    <table id="tableSearch" cellpadding="0" cellspacing="0">    
        <tbody id="tbodySearch">
            <tr>
                <td id="tdAdvSearch" style="text-align: left; padding-left: 20px;">
                    <div style="height: 25px;">选择条件：
                        <select name="MemberSearch1$ddlSearchParamName_0" id="MemberSearch1_ddlSearchParamName_0" class="ParamName" onchange="BindSearchType(this)" lastTr="true" style="width: 140px;">
	<option value="||00000000-0000-0000-0000-000000000000">请选择</option>
	<option value="string|MemberName|f0326cb7-42b5-4f5f-9bf4-b9224040fe8a">幼儿姓名</option>
	<option value="string|NickName|7b044a29-1d6f-4838-b297-63e56c8085b3">幼儿昵称</option>
	<option value="string|CardNo|f8282e38-27c8-497f-9645-7261fa95b86a">学号</option>
	<option value="datetime|BirthDate|64c4c9db-dcd9-4636-bd13-2d3c7cc8c60f">生日</option>
	<option value="string|MemberTypeName|35f407e1-1885-45ed-8b96-1d2e80ba9356">幼儿类型</option>
	<option value="string|Mobile|77bf9ffa-7388-4153-8b23-1f6181c3d5d7">手机号码</option>
	<option value="string|SourceName|8f403eea-e37c-4b1a-9b33-7beba39802ad">幼儿来源</option>
	<option value="datetime|CreateTime|d0b02efd-0e88-4c80-a5e1-bde50fc3a730">录入日期</option>
	<option value="datetime|EnrollDate|68dfaac3-fecd-4d62-b3ac-31e1125383d1">入学日期</option>
	<option value="string|TermName|48cf9fd0-e435-4a48-a028-19223f2cb8aa">学期</option>
	<option value="string|Guardian|b2ccf71e-086d-44da-b326-ff900f306121">家长姓名</option>
	<option value="string|ClassName|840aabf5-9adf-40b3-9aa2-4d44a458c176">班级</option>
	<option value="string|BatchTitle|19afa661-c133-416f-a9ac-a5c9b349c34d">导入批次</option>
	<option value="string|Marks|0ea19255-f43b-46cb-940b-ae7622593a5b">标签</option>
	<option value="string|Phone|c4e33202-99b1-1031-a281-ce27594a651e">固定电话</option>
	<option value="string|Notes|e7b0dd9e-99b0-1031-a281-ce27594a651e">备注</option>
	<option value="string|Address|78e86d39-8ba2-41b0-b2c5-8c2908406927">家庭住址</option>
	<option value="datetime|GraduateDate|f8cee3bf-e855-4c71-978a-8a05dc8a4c97">离校日期</option>
	<option value="string|Member_UD1|7abf48c3-aa74-4a9c-bf89-e3a7891521cb">建议级别</option>

</select>&nbsp;
                        <select name="MemberSearch1$ddlSearchType_0" id="MemberSearch1_ddlSearchType_0" class="int" onchange="showNullOrNotNull(this)">

</select>&nbsp;
                        <span id="span_ValueContent_0">
                            <input name="MemberSearch1_Value" type="text" id="MemberSearch1_Value_0" class="int" />
                        </span>&nbsp;&nbsp;
                        
                        <input type="button" class="button" id="btnSearch" onclick="SaveSearchParam()" value="搜 索" />&nbsp;&nbsp;<input type="button" class="button" id="btnBaseSearch" value="基本搜索" />
                        
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</div>
<script type="text/javascript">
    function addBaseSearch() {
        $(".advSearch").remove();
        $("#tdAdvSearch").addClass("hidden");
        $("#tbodySearch").append("<tr id='trBaseSearch'><td style='text-align: left; padding-left: 20px;height:25px;'>模糊搜索：<input type='text' class='int' style='width:220px;margin-left:4px;' id='tbBaseSearchKey' name='tbBaseSearchKey'/>&nbsp;&nbsp;<input type='button' class='button' id='btnAllSearch' value='搜 索' />&nbsp;&nbsp;<input type='button' class='button' id='btnAdvSearch' value='高级搜索' /><span id='searchMultiple1'></span></td></tr>");
        if ($("#searchMultiple").html() != null) {
            $("#searchMultiple1").html($("#searchMultiple").html());
        }
        $("#btnAdvSearch").click(function () {
            $("#trBaseSearch").remove();
            $("#tdAdvSearch").removeClass("hidden");
        });
        $("#btnAllSearch").click(function () {
            //幼儿管理
            if ($("#searchMultiple").html() != null) {
                SaveSearchMultiParam();
            }
            $('#Test').flexOptions({ newp: 1 }).flexReload(); return false;
        });
    }
    $(function () {
        addBaseSearch();

        $("#btnBaseSearch").click(function () {
            addBaseSearch();
        });
    });

    //高级搜索 是否显示“添加综合搜索” 幼儿管理使用
    //var trheight = 25;
    //function reSetHeight() {
    //    var tmpHeight = $("#tableSearch").find("tr").size() * trheight;
    //    if (typeof fixPageHeight != "undefined") {
    //        tmpHeight = tmpHeight + fixPageHeight;
    //    }
    //    $(".bDiv").height($(window).height() - tmpHeight);
    //}
    var trheight = 25;
    function reSetHeight() {
        var p = 0;
        if ($("#tdAdvSearch").hasClass("hidden")) {
            p = trheight;
        }
        var tmpHeight = $("#tableSearch").find("tr").size() * trheight - p + $(".div_MultiParam").size() * trheight;
        if (typeof fixPageHeight != "undefined") {
            tmpHeight = tmpHeight + fixPageHeight;
        }
        $(".bDiv").height($(window).height() - tmpHeight);

        if (typeof flexiGridReSetColumnBtn != "undefined") {
            flexiGridReSetColumnBtn();
        }
    }


    $("#tbAdvSearchParams").val("");

    SearchModel = function () {
        this.ID = "";
        this.ParamName = "";
        this.SearchType = "";
        this.SearchTypeText = "";
        this.ParamType = "";
        this.ParamValue = "";
        this.Value = "";
        this.ValueText = "";
    };
    function BindSearchType(obj) {
        //添加多搜索条件
        if ($(obj).val() != "||00000000-0000-0000-0000-000000000000") {
            if ($(obj).attr("lastTr") == "true") {//最后一行
                $(obj).removeAttr("lastTr");
                AddSearchParam();
            }
        }
        var last_id = obj.id.split('_')[2];
        var v = $(obj).val();
        var val = v.split('|')[2];
        var searchtype = v.split('|')[0];
        $.AjaxETM("CRM_GetSearchParam", { "action": "getsearchtype", "strGuid": val }, function (result) {
            $("#MemberSearch1_ddlSearchType_" + last_id).html(result);
            if (!bindddl(v.split('|')[1], last_id)) {
                if (searchtype == "datetime") {
                    $("#span_ValueContent_" + last_id).html('<input name="MemberSearch1_Value" type="text" id="MemberSearch1_Value_' + last_id + '" class="int" onfocus="WdatePicker({dateFmt:\'yyyy-MM-dd\'})" />');
                }
                else if (searchtype == "int") {
                    $("#span_ValueContent_" + last_id).html('<input name="MemberSearch1_Value" type="text" id="MemberSearch1_Value_' + last_id + '" onchange="checkData(this)" class="int" />');
                }
                else {
                    $("#span_ValueContent_" + last_id).html('<input name="MemberSearch1_Value" type="text" id="MemberSearch1_Value_' + last_id + '" class="int" />');
                }
            }
        }, false, "text");
    };
    function AddSearchParam() {
        var rand = (parseInt(Math.random() * 100000)).toString();
        var strHtml = "";
        strHtml += "<tr class='advSearch'><td style=\"text-align:left;padding-left:20px;\"><div style='height:25px;'> 选择条件：&nbsp;";

        strHtml += "<select id=\"MemberSearch1_ddlSearchParamName_" + rand + "\"  style=\"width:140px;\" class=\"ParamName\" onchange=\"BindSearchType(this)\"  lastTr=\"true\" >";
        strHtml += $("#MemberSearch1_ddlSearchParamName_0").html();
        strHtml += "</select>&nbsp;&nbsp;";

        strHtml += "<select id=\"MemberSearch1_ddlSearchType_" + rand + "\" class=\"int\" onchange=\"showNullOrNotNull(this)\" >";
        strHtml += "</select>&nbsp;&nbsp;";

        strHtml += "<span id=\"span_ValueContent_" + rand + "\"><input type=\"text\" id=\"MemberSearch1_Value_" + rand + "\" class=\"int\" /></span>";

        strHtml += "<span>&nbsp;&nbsp;<a href=\"javascript:void(0);\" onclick=\"DeleteSearchParam(this)\"><img src=\"../../Images/no.png\" title=\"取消\"/></a></span>"

        strHtml += "</div></td></tr>";
        $("#tbodySearch").append(strHtml);
        $("#MemberSearch1_ddlSearchParamName_" + rand).get(0).selectedIndex = 0;
        reSetHeight();
        ReSizeScrollbar();
        ReSizeFlexgridScrollbar();
    }

    //选择空或非空时
    function showNullOrNotNull(obj) {
        var last_id = obj.id.split('_')[2];
        if ($("#MemberSearch1_ddlSearchType_" + last_id).val() == "null" || $("#MemberSearch1_ddlSearchType_" + last_id).val() == "notnull") {
            //$("#MemberSearch1_Value_" + last_id).css("display", "none");
            $("#span_ValueContent_" + last_id).hide();
        }
        else {
            //$("#MemberSearch1_Value_" + last_id).css("display", "");
            $("#span_ValueContent_" + last_id).show()
        }
    }
    //取消搜索条件
    function DeleteSearchParam(obj) {
        if ($(obj).parent().parent().parent().find("select").eq(0).attr("lastTr") == "true") {//最后一行
            if ($(obj).parent().parent().parent().parent().prev() != undefined)
                $(obj).parent().parent().parent().parent().prev().find("td").eq(0).find("select").eq(0).attr("lastTr", "true");
        }
        $(obj).parents("tr").eq(0).remove();
        //$(obj).parent().parent().parent().remove();
        reSetHeight();
        ReSizeScrollbar();
        ReSizeFlexgridScrollbar();
    }
    //验证数值
    function checkData(obj) {
        if ($(obj).val() == "") {
            alert("请输入正确的数值");
            return;
        }
        if (!(/(^[1-9]\d*$)/.test($(obj).val()))) {
            $(obj).val("");
            alert("请输入正确的数值");
            return;
        }
    }

    //各种下拉，各种绑定
    //年龄，幼儿状态，幼儿级别，重要程度，网络来源，区域，首次接触
    function bindddl(searchparamname, last_id) {
        if (searchparamname == "YBirthDate") {//年龄
            $.AjaxETM("CRM_GetSearchParam", { "action": "getbind", "paramvalue": "YBirthDate" }, function (result) {
                var strHtml = "";
                strHtml += '<select name="MemberSearch1_Value1" id="MemberSearch1_Value1_' + last_id + '" style="width:80px;">';
                strHtml += result;
                strHtml += '</select>&nbsp;&nbsp;';
                strHtml += '<select name="MemberSearch1_Value2" id="MemberSearch1_Value2_' + last_id + '" style="width:80px;">';
                for (var i = 0; i < 12; i++) {
                    strHtml += '<option value="' + i + '">' + i + '个月</option>';
                }
                strHtml += '</select>';
                $("#span_ValueContent_" + last_id).html(strHtml);
            }, false, "text");
            return true;
        }//一级下拉
       
            else if (searchparamname == "SourceGuid" || searchparamname == "AreaGuid") {//幼儿来源/地区
                $.AjaxETM("CRM_GetSearchParam", { "action": "getbind", "paramvalue": searchparamname }, function (result) {
                    var strHtml = "";
                    strHtml += '<select name="MemberSearch1_Value1" id="MemberSearch1_Value1_' + last_id + '" onchange="ddlChange(this, \'' + searchparamname + '\')" style="width:80px;">';
                    strHtml += result.split('|')[0];
                    strHtml += '</select>&nbsp;&nbsp;';
                    strHtml += '<select name="MemberSearch1_Value2" id="MemberSearch1_Value2_' + last_id + '" style="width:80px;">';
                    strHtml += result.split('|')[1];
                    strHtml += '</select>';
                    $("#span_ValueContent_" + last_id).html(strHtml);
                }, false, "text");
                return true;
            }
            else {
                return false;
            }
    }
    function ddlChange(obj, v) {
        var last_id = obj.id.split('_')[2];
        var param;
        if (v == "SourceGuid")
            param = "SubSourceGuid";
        else if (v == "AreaGuid")
            param = "SubAreaGuid";
        $.AjaxETM("CRM_GetSearchParam", { "action": "getbind", "paramvalue": param, "strGuid": $("#MemberSearch1_Value1_" + last_id).val() }, function (result) {
            $("#MemberSearch1_Value2_" + last_id).html(result);
        }, false, "text");
    }

    function SaveSearchParam() {
        //var searchParamList = $.parseJSON($.cookie("searchparamlist"));
        var lst = new Array();
        var arr = $(".ParamName");
        $.each(arr, function (i, obj) {
            if ($(obj).val() == "||00000000-0000-0000-0000-000000000000")
                return true;
            var last_id = obj.id.split('_')[2];

            var searchParam = new SearchModel();
            var dt = new Date();
            searchParam.ID = dt.getHours().toString() + dt.getMinutes().toString() + dt.getMilliseconds().toString();
            searchParam.ParamValue = $("#MemberSearch1_ddlSearchParamName_" + last_id).val().split('|')[1];
            searchParam.ParamName = $("#MemberSearch1_ddlSearchParamName_" + last_id).find('option:selected').text();
            searchParam.ParamType = $("#MemberSearch1_ddlSearchParamName_" + last_id).val().split('|')[0];
            searchParam.Value = $.trim($("#MemberSearch1_Value_" + last_id).val());
            searchParam.ValueText = "";
            searchParam.SearchType = $("#MemberSearch1_ddlSearchType_" + last_id).val();
            searchParam.SearchTypeText = $("#MemberSearch1_ddlSearchType_" + last_id).find('option:selected').text();

            if (searchParam.ParamValue == "YBirthDate") {
                searchParam.ValueText = $("#MemberSearch1_Value1_" + last_id).find('option:selected').text() + $("#MemberSearch1_Value2_" + last_id).find('option:selected').text();
                searchParam.Value = $.trim($("#MemberSearch1_Value1_" + last_id).val()) + "|" + $.trim(("#MemberSearch1_Value2_" + last_id).val());
            }
            else if (searchParam.ParamValue == "StatusGuid" || searchParam.ParamValue == "MktStaffGuid") {
                searchParam.ValueText = $("#MemberSearch1_Value_" + last_id).find('option:selected').text();
            }
            else if (searchParam.ParamValue == "SourceGuid" || searchParam.ParamValue == "AreaGuid") {//幼儿来源//地区
                if ($("#MemberSearch1_Value2_" + last_id).val() != "00000000-0000-0000-0000-000000000000") {
                    searchParam.ValueText = $("#MemberSearch1_Value2_" + last_id).find('option:selected').text();
                    searchParam.Value = $.trim($("#MemberSearch1_Value2_" + last_id).val());
                }
                else {
                    searchParam.ValueText = $.trim($("#MemberSearch1_Value1_" + last_id).find('option:selected').text());
                    searchParam.Value = $.trim($("#MemberSearch1_Value1_" + last_id).val());
                }
            }
            else {
                searchParam.ValueText = $.trim($("#MemberSearch1_Value_" + last_id).val());
            }

            lst.push(searchParam);
        });
        $("#tbAdvSearchParams").val(JSON2.stringify(lst));

        // hidediv();
    }
</script>

        

<script type="text/javascript">
    function clearAll() {
        $(".int,#tbAdvSearchParams").val("");
        $("#tableSearch tr").each(function (i, n) {
            if (i == 0) {
                var $selects = $(this).find("select");
                $selects.eq(0).val("||00000000-0000-0000-0000-000000000000");
                $selects.eq(0).attr("lastTr", "true");
                $selects.eq(1).html("");
                if (typeof BindSearchType != "undefined") {
                    BindSearchType($selects.eq(0)[0]);
                }
            } else {
                $(this).remove();
            }
        });

    }

    function beforeRefresh($th, id) {
        switch (id) {
            case "memberNameContainer":
                var memberNameStr = $.trim($("#txtMemberName").val());
                if (memberNameStr.length == 0 || memberNameStr == "n") {
                    $th.html("幼儿姓名");
                }
                else {
                    $th.html(memberNameStr);
                }
                break;
            case "mobileContainer":
                var mobileStr = $.trim($("#txtMobile").val());
                if (mobileStr.length == 0 || mobileStr == "n") {
                    $th.html("手机号码");
                }
                else {
                    $th.html(mobileStr);
                }
                break;
            case "nowClassNameContainer":
                var nowClassNameStr = $.trim($("#txtNowClassName").val());
                if (nowClassNameStr.length == 0 || nowClassNameStr == "n") {
                    $th.html("班级");
                }
                else {
                    $th.html(nowClassNameStr);
                }
                break;
            case "followContainer":
                var dayCountStr = $.trim($("#txtDayCount").val());

                $(".etmlink").removeClass("etmlink");
                $("#linkContent").find("a:first").addClass("etmlink");
                $("#hFlag").val(0);

                if (dayCountStr.length == 0 || parseInt(dayCountStr) == "NaN") {
                    $th.html("多久未跟进");
                }
                else {
                    $th.html(dayCountStr + "天未跟进");
                }
                break;
            case "idContainer":
                var id1 = $.trim($("#txtSID").val());
                var id2 = $.trim($("#txtEID").val());
                if (id1.length == 0 && id2.length == 0) {
                    $th.html("编号");
                } else {
                    $th.html(id1 + " 至 " + id2);
                }
                break;
            case "sourceContainer":
                var sourceStr = $("#sourceContainer #ddlSource").find("option:selected").text();
                var subSourceStr = $("#sourceContainer #ddlSubSource").find("option:selected").text();
                var headerStr = "幼儿来源";
                if (sourceStr.length > 0 && sourceStr != "请选择") {
                    headerStr = sourceStr;
                    if (subSourceStr.length > 0 && subSourceStr != "请选择") {
                        headerStr += " - " + subSourceStr;
                    }
                }
                $th.html(headerStr);
                break;
            default:
                if (typeof beforeRefreshEx != "undefined") {
                    beforeRefreshEx($th, id);
                }
                break;
        }
    }
</script>

<div style="display: none">
    <div id="idContainer" style="width: 150px;" >
        <input class="int" id="txtSID" name="txtSID" style="width:64px"/> - 
        <input class="int" id="txtEID" name="txtEID" style="width:64px"/>
    </div>
    <div id="memberNameContainer" style="width: 160px;">
        <input class="int" id="txtMemberName" name="txtMemberName" />
    </div>
    <div id="mobileContainer" style="width: 100px;">
        <input class="int" id="txtMobile" name="txtMobile" style="width:90px"/>
    </div>
    <div id="followContainer" style="width: 100px;">
        <input class="int" id="txtDayCount" name="txtDayCount" style="width:70px"/> 天
    </div>
     <div id="nowClassNameContainer" style="width: 160px;">
        <input class="int" id="txtNowClassName" name="txtNowClassName" />
    </div>
    <select class='int' id='ddlStatus' name='ddlStatus'   ><option value='00000000-0000-0000-0000-000000000000'>请选择</option></select>
    
    
    <div id="assignContainer" style="width: 150px;">
        <input class="int" id="Text1" name="container_txtLastAssignTime1" style="width: 65px" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>                - 
        <input class="int" id="Text2" name="container_txtLastAssignTime2" style="width: 65px" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"/>
    </div>
</div>
        <table id='Test' style='display:none;'></table><input type='text' style='display:none;' id='etmparams' name='etmparams' value='[{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"幼儿姓名","Name":"MemberName","Width":80,"Sortable":false,"ColumnHeader_BindId":"memberNameContainer","ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":true,"LinkStrForamtBindColumn":"MemberGuid","LinkStrForamt":"javascript:ShowInfo(\"{0}\")","LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"性别","Name":"Sex","Width":60,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":"GuardianInfo","Display":"家长","Name":"Guardian,Guardianship","Width":120,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"手机","Name":"Mobile","Width":100,"Sortable":false,"ColumnHeader_BindId":"mobileContainer","ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"电话","Name":"Phone","Width":100,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":null,"Display":"QQ","Name":"QQ","Width":100,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"Center","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false},{"IsCanHide":true,"FormatString":null,"ColumnType":"String","PageColumnGuid":"00000000-0000-0000-0000-000000000000","PageName":null,"SortId":0,"IsSetValueEqualName":false,"VirtualColumn":"RouteInfo","Display":"路线站点","Name":"RouteName,SiteName","Width":470,"Sortable":false,"ColumnHeader_BindId":null,"ColumnHeader_IsBindDropDownList":false,"Align":"left","Checkbox":false,"IsLink":false,"LinkStrForamtBindColumn":null,"LinkStrForamt":null,"LinkClass":"","OperationButtons":"","SubStringLength":0,"BindAttrs":null,"IsJsAddColumn":false}]'/><input type='text' style='display:none;' id='etmUrlparams' name='etmUrlparams' value='[{"Key":"navId","Value":"40794e66-8ad0-400a-964a-aba1f009c80e"}]'/><input type='text' style='display:none;' id='etmPageUrl' name='etmPageUrl' value='http://vip.yj.etmcn.com/Modules/CRM/CarMembers.aspx?navId=40794e66-8ad0-400a-964a-aba1f009c80e'/><input type='text' style='display:none;' id='pagename' name='pagename' value='CarMembers'/><input type='text' style='display:none;' id='pageamethod' name='pageamethod' value='CarMembersCarMembers'/><script type='text/javascript'> var etmFormId='form1';function fixIE9() {if ($.browser.msie && $.browser.version == 9) {$('#form1 select').each(function () {var name = $(this).attr('name');if (name != undefined && name.length > 0) {var value = $(this).val();if (value == null) {value = $(this).find('option:first').attr('value');$(this).val(value);}}});}}function RefreshGrid(){ $('#Test').flexOptions().flexReload(); };function addFormData() {fixIE9(); var dt = $('#form1').serializeArray(); $('#Test').flexOptions({ params: dt }); return true; }$(function () { $('#btnSearch').click(function () { $('#Test').flexOptions({ newp: 1 }).flexReload(); return false; }); });$('#Test').flexigrid({url: './data/xcCcyeck.json',sortname: 'MemberID',sortorder: 'asc',usepager: true,useRp: true,rpOptions: [20,30,50,100,200],rp: 30,colModel: [{ display: '幼儿姓名', name: 'MemberName',etmname:'MemberName', width: 80, sortable: false, align: 'Center', checkbox: false ,IsLink:true,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'memberNameContainer',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '性别', name: 'Sex',etmname:'Sex', width: 60, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '家长', name: 'Guardian,Guardianship',etmname:'GuardianInfo', width: 120, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '手机', name: 'Mobile',etmname:'Mobile', width: 100, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'mobileContainer',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '电话', name: 'Phone',etmname:'Phone', width: 100, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: 'QQ', name: 'QQ',etmname:'QQ', width: 100, sortable: false, align: 'Center', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false},{ display: '路线站点', name: 'RouteName,SiteName',etmname:'RouteInfo', width: 470, sortable: false, align: 'left', checkbox: false ,IsLink:false,LinkClass:'',OperationButtons:'',SubStringLength:0,hide:false,BindId:'',IsForDDL:false,IsCanHide:true,FormatString:'',ColumnType:'String',IsJsAddColumn:false}],width: $(window).width(),height: $(window).height()-180+60,onSubmit: addFormData});</script>
    </form>
</body>
</html>
